return elements of a column given the header
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| type(Table), | intent(in) | :: | tab | |||
| character(len=*), | intent(in) | :: | id |
header id |
| Type | Visibility | Attributes | Name | Initial | |||
|---|---|---|---|---|---|---|---|
| logical, | public | :: | found | ||||
| integer, | public | :: | i |
FUNCTION TableGetColByHeader & ! ( tab, id ) & ! RESULT (col) IMPLICIT NONE !arguments with intent (in): TYPE (table), INTENT (IN) :: tab CHARACTER (LEN = *), INTENT (IN) :: id !! header id !local dclarations: TYPE (Column) :: col INTEGER :: i LOGICAL :: found !--------------------------------end of declarations--------------------------- found = .FALSE. DO i = 1, tab % noCols IF ( tab % col (i) % header == id ) THEN col = tab % col (i) found = .TRUE. END IF END DO RETURN END FUNCTION TableGetColByHeader